{% extends "../layout.html" %}

{% block subtitle %}私信列表{% end %}
{% block style %}
  <link rel="shortcut icon" href="{{ current_user.get_avatar(size=48) }}" type="image/x-icon" />
  {% module Template("modules/user_mixin.html", user=current_user) %}
{% end %}
{% block script %}
<script src="{{ static_url('js/user.js') }}"></script>
{% end %}
{% block body %}
<ul class="body-nav">
  <li>
    <a href="/"><i class="icon-home"></i>&nbsp;{{ handler.settings['site_name'] }}</a>
  </li>
  <li>
    <a href="/users">用户</a>
  </li>
  <li>
    <a href="{{ current_user.url }}">{{ escape(current_user.nickname) }}</a>
  </li>
  <li class="now">
    私信
  </li>
</ul>
<div class="organ message-box-list nav-shadow">
  <div class="nav-wrap no-top-border">
    <ul class="nav clearfix">
      <li {% if category == 'unread' %}class="on"{% end %}>
        <a href="/messages?category=unread">未读</a>
      </li>
      <li {% if category == 'all' %}class="on"{% end %}>
        <a href="/messages">全部</a>
      </li>
    </ul>
    <div class="nav-bottom">
      <div class="nav-bottom-span gray"></div>
    </div>
  </div>
  {{ modules.MessageBoxList(message_boxes=current_user.get_message_boxes(category=category, page=page))}}
</div>
{% end %}
